#!/bin/bash

while [ $# != 0 ]; do
    echo -n "$#: $1, "
    opt=$1
    shift
    case $opt in
        1)
            echo case 1
            ;;
        2)
            echo case 2
            ;;
        3)
            echo case 3
            ;;
        exit)
            echo case exit, exting
            break
            ;;
        5*)
            echo case 5*
            ;;
        *)
            echo default
            ;;
        4)
            echo case 4
            ;;
    esac
done
